home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 165 / XENIATGM165.ISO / Goodies / Toca Race Driver Etoy / racedriver-etoy.exe / race_downloadable.dcr / Internal_37_score submission.ls < prev    next >
Encoding:
Text File  |  2002-08-16  |  1.6 KB  |  53 lines

  1. property pLoop, pTimeToExit
  2. global gPermanentGlobals, gFlashSprite, gFlashvariables, gPlayersTotalMilliseconds, gVehicles
  3.  
  4. on beginSprite me
  5.   pLoop = 1
  6.   pTimeToExit = VOID
  7.   gFlashSprite.addlistener(me)
  8. end
  9.  
  10. on action me, actiontype
  11.   case actiontype of
  12.     "cancelSubmit":
  13.       go("restart")
  14.     "submitScore":
  15.       submitData = [:]
  16.       submitData["firstname"] = gFlashSprite.pSprite.getVariable("firstName")
  17.       submitData["lastname"] = gFlashSprite.pSprite.getVariable("lastName")
  18.       submitData["email"] = gFlashSprite.pSprite.getVariable("email")
  19.       submitData["location"] = gFlashSprite.pSprite.getVariable("country")
  20.       submitData["time"] = string(gPlayersTotalMilliseconds)
  21.       submitData["position"] = string(gFlashvariables["userPlace"])
  22.       nfo = gFlashSprite.pSprite.getVariable("info")
  23.       if nfo = EMPTY then
  24.         nfo = 0
  25.       end if
  26.       submitData["info"] = nfo
  27.       submitData["race"] = string(gPermanentGlobals.race)
  28.       submitData["language"] = string(gPermanentGlobals.userLanguage)
  29.       put submitData
  30.       tURL = "http://www.codemasters.com/tocaracedriver/etoy/tocascores.php"
  31.       sendencryptedData(tURL, submitData)
  32.       pTimeToExit = the milliSeconds + 3000
  33.     "submitAnimOver":
  34.     "tryagainSubmit":
  35.   end case
  36. end
  37.  
  38. on exitFrame me
  39.   if integerp(pTimeToExit) then
  40.     if the milliSeconds > pTimeToExit then
  41.       go("restart")
  42.     end if
  43.   end if
  44.   go(the frame)
  45. end
  46.  
  47. on getPropertyDescriptionList me
  48.   eventList = ["carAnimOver", "submitAnimOver", "carChosen"]
  49.   l = [:]
  50.   l[#pWaitEvent] = [#comment: "Which label?", #format: #string, #range: eventList, #default: eventList[1]]
  51.   return l
  52. end
  53.